package java67_8;

import java.util.Scanner;

public class Triangle {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int h = 0;
		while (true) {
			System.out.print("输入高度:");
			h = in.nextInt();
			if (h > 1)
				break;
			System.out.println("输入错误,重来");
		}
		for (int i = 1; i <= h; i++) {
			for (int j = 1; j <= 2 * i - 1; j++) {// 内层循环依赖外层循环的条件
				System.out.print("*");
			}
			System.out.println();
		}
	}

}
